<template>
    <div class="goodsdesc-container">
        <h3>{{list.title}}</h3>
        <hr>
        <div class="content" v-html="list.content"></div>
        <img :src="list.img_url" alt="">
    </div>
</template>

<script>
export default {
    data() {
        return {
            list:{},
            id:this.$route.params.id,
        }
    },
    methods:{
        getDesc(){
            this.$http.get('static/data.json').then(res => {
                this.list = res.body.data.goods[this.id];
                console.log(this.list)
            })
        }
    },
    created(){
        this.getDesc();
    }
}
</script>

<style scoped>
.goodsdesc-container h3{
    text-align: center;
    color: #226aff;
    font-size: 16px;
    margin: 15px 0;
}
.goodsdesc-container img{
    width: 100%;
}
.goodsdesc-container{
    padding:0px 10px;
}
.content{
    font-size: 15px;
    color: #333;
    margin: 5px;
}
</style>
